package Analysis;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

import Definitions.GraphClass;
import Global.ConstantVariable;
import Global.DirectoryStructureAndSettingsClass;
import GraphProperties.AccuracyRelatedPropsClass;
import GraphProperties.ClusteringCoefficientRelatedPropsClass;
import GraphProperties.DegreeDistributionRelatedPropsClass;
import GraphProperties.HomophilyRelatedPropsClass;
import GraphProperties.LocalAlphaRelatedPropsClass;

public class CorrelationManagerClass {
	
	public CorrelationsClass correlations;
	
	CorrelationManagerClass()
	{
		correlations = new CorrelationsClass();
	}
	
	public void calculateCorrelationsResults(GraphClass graph, String datasetName)
	{
		CorrelationCalculatorAbstractClass correlationCalculator = CorrelationCalculatorFactory.createCorrelationCalculator(ConstantVariable.CorrelationCalculator_ConstantVariables.DEFAULT_CORRELATION_MEASURE);
		
		DegreeDistributionRelatedPropsClass degreeDistributionRelatedPropsCO = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).degreeDistributionRelatedProps;				
		ClusteringCoefficientRelatedPropsClass clusteringCoefficientRelatedPropsCO = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).clusteringCoefficientRelatedProps;
		HomophilyRelatedPropsClass homophilyRelatedPropsCO  = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).homophilyRelatedProps;
		LocalAlphaRelatedPropsClass localAlphaRelatedPropsCO = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).localAlphaRelatedProps;
		AccuracyRelatedPropsClass accuracyRelatedPropsCO = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).accuracyRelatedProps;
		
		
		DegreeDistributionRelatedPropsClass degreeDistributionRelatedPropsLO = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).degreeDistributionRelatedProps;				
		ClusteringCoefficientRelatedPropsClass clusteringCoefficientRelatedPropsLO = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).clusteringCoefficientRelatedProps;
		HomophilyRelatedPropsClass homophilyRelatedPropsLO  = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).homophilyRelatedProps;
		LocalAlphaRelatedPropsClass localAlphaRelatedPropsLO = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).localAlphaRelatedProps;
		AccuracyRelatedPropsClass accuracyRelatedPropsLO = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).accuracyRelatedProps;
		
		double[] preparedkCOExceptForCC = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).prepareForCorrelationCalculation(degreeDistributionRelatedPropsCO.getDegreeListOfNodes(), 1); 
		double[] preparedhCOExceptForCC = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).prepareForCorrelationCalculation(homophilyRelatedPropsCO.getHomophilyListOfTheNodes(), 1);
		
		double[] preparedalphaCOExceptForCC = null;
		double[] preparedAccuracyCOExceptForCC= null;
		
		if(ConstantVariable.ExecutionParameters.isLocalAlphaCalculationForTheGraphEnabled)
		{
			preparedalphaCOExceptForCC = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).prepareForCorrelationCalculation(localAlphaRelatedPropsCO.getLocalAlphaListOfTheNodes(), 1);
			preparedAccuracyCOExceptForCC = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).prepareForCorrelationCalculation(accuracyRelatedPropsCO.getAccuracyListOfTheNodes(), 1);
		}
		
		double[] preparedkCOForCC = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).prepareForCorrelationCalculation(degreeDistributionRelatedPropsCO.getDegreeListOfNodes(), 2); 
		double[] preparedcCOForCC = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).prepareForCorrelationCalculation(clusteringCoefficientRelatedPropsCO.getClusteringCoefficientListOfTheNodes(), 2);
		double[] preparedhCOForCC = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).prepareForCorrelationCalculation(homophilyRelatedPropsCO.getHomophilyListOfTheNodes(), 2);
		
		double[] preparedalphaCOForCC = null;
		double[] preparedAccuracyCOForCC = null;
		
		if(ConstantVariable.ExecutionParameters.isLocalAlphaCalculationForTheGraphEnabled)
		{
			preparedalphaCOForCC = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).prepareForCorrelationCalculation(localAlphaRelatedPropsCO.getLocalAlphaListOfTheNodes(), 2);
			preparedAccuracyCOForCC = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).prepareForCorrelationCalculation(accuracyRelatedPropsCO.getAccuracyListOfTheNodes(), 2);
		}
		
		double[] preparedkLOExceptForCC = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).prepareForCorrelationCalculation(degreeDistributionRelatedPropsLO.getDegreeListOfNodes(), 1); 
		double[] preparedhLOExceptForCC = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).prepareForCorrelationCalculation(homophilyRelatedPropsLO.getHomophilyListOfTheNodes(), 1);
		
		double[] preparedalphaLOExceptForCC = null;;
		double[] preparedAccuracyLOExceptForCC = null;;
		
		if(ConstantVariable.ExecutionParameters.isLocalAlphaCalculationForTheGraphEnabled)
		{
			preparedalphaLOExceptForCC = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).prepareForCorrelationCalculation(localAlphaRelatedPropsLO.getLocalAlphaListOfTheNodes(), 1);
			preparedAccuracyLOExceptForCC = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).prepareForCorrelationCalculation(accuracyRelatedPropsLO.getAccuracyListOfTheNodes(), 1);
		}
		
		double[] preparedkLOForCC = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).prepareForCorrelationCalculation(degreeDistributionRelatedPropsLO.getDegreeListOfNodes(), 2);
		double[] preparedcLOForCC = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).prepareForCorrelationCalculation(clusteringCoefficientRelatedPropsLO.getClusteringCoefficientListOfTheNodes(), 2);
		double[] preparedhLOForCC = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).prepareForCorrelationCalculation(homophilyRelatedPropsLO.getHomophilyListOfTheNodes(), 2);
		
		double[] preparedalphaLOForCC = null;
		double[] preparedAccuracyLOForCC = null;
		
		if(ConstantVariable.ExecutionParameters.isLocalAlphaCalculationForTheGraphEnabled)
		{
			preparedalphaLOForCC = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).prepareForCorrelationCalculation(localAlphaRelatedPropsLO.getLocalAlphaListOfTheNodes(), 2);
			preparedAccuracyLOForCC = graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).prepareForCorrelationCalculation(accuracyRelatedPropsLO.getAccuracyListOfTheNodes(), 2);
		}
		
		
		correlations.setCor_kCO_cCO(correlationCalculator.calculateCorrelation(preparedkCOForCC, preparedcCOForCC));
		correlations.setCor_kCO_hCO(correlationCalculator.calculateCorrelation(preparedkCOExceptForCC, preparedhCOExceptForCC));
		correlations.setCor_kCO_alphaCO(correlationCalculator.calculateCorrelation(preparedkCOExceptForCC, preparedalphaCOExceptForCC));
		correlations.setCor_kCO_accuracyCO(correlationCalculator.calculateCorrelation(preparedkCOExceptForCC, preparedAccuracyCOExceptForCC));

		
		correlations.setCor_cCO_hCO(correlationCalculator.calculateCorrelation(preparedcCOForCC, preparedhCOForCC));
		correlations.setCor_cCO_alphaCO(correlationCalculator.calculateCorrelation(preparedcCOForCC, preparedalphaCOForCC));
		correlations.setCor_cCO_accuracyCO(correlationCalculator.calculateCorrelation(preparedcCOForCC, preparedAccuracyCOForCC));
		
		correlations.setCor_hCO_alphaCO(correlationCalculator.calculateCorrelation(preparedhCOExceptForCC, preparedalphaCOExceptForCC));
		correlations.setCor_hCO_accuracyCO(correlationCalculator.calculateCorrelation(preparedhCOExceptForCC, preparedAccuracyCOExceptForCC));
		
		correlations.setCor_alphaCO_accuracyCO(correlationCalculator.calculateCorrelation(preparedalphaCOExceptForCC, preparedAccuracyCOExceptForCC));
		
		correlations.setCor_kLO_cLO(correlationCalculator.calculateCorrelation(preparedkLOForCC, preparedcLOForCC));
		correlations.setCor_kLO_hLO(correlationCalculator.calculateCorrelation(preparedkLOExceptForCC, preparedhLOExceptForCC));
		correlations.setCor_kLO_alphaLO(correlationCalculator.calculateCorrelation(preparedkLOExceptForCC, preparedalphaLOExceptForCC));
		correlations.setCor_kLO_accuracyLO(correlationCalculator.calculateCorrelation(preparedkLOExceptForCC, preparedAccuracyLOExceptForCC));
		
		correlations.setCor_cLO_hLO(correlationCalculator.calculateCorrelation(preparedcLOForCC, preparedhLOForCC));
		correlations.setCor_cLO_alphaLO(correlationCalculator.calculateCorrelation(preparedcLOForCC, preparedalphaLOForCC));
		correlations.setCor_cLO_accuracyLO(correlationCalculator.calculateCorrelation(preparedcLOForCC, preparedAccuracyLOForCC));
		
		correlations.setCor_hLO_alphaLO(correlationCalculator.calculateCorrelation(preparedhLOExceptForCC, preparedalphaLOExceptForCC));
		correlations.setCor_hLO_accuracyLO(correlationCalculator.calculateCorrelation(preparedhLOExceptForCC, preparedAccuracyLOExceptForCC));
		
		correlations.setCor_alphaLO_accuracyLO(correlationCalculator.calculateCorrelation(preparedalphaLOExceptForCC, preparedAccuracyLOExceptForCC));
		
		
		correlations.setCor_kCO_kLO(correlationCalculator.calculateCorrelation(degreeDistributionRelatedPropsCO.getDegreeListOfNodes(), degreeDistributionRelatedPropsLO.getDegreeListOfNodes()));
		correlations.setCor_kCO_cLO(correlationCalculator.calculateCorrelation(degreeDistributionRelatedPropsCO.getDegreeListOfNodes(), clusteringCoefficientRelatedPropsLO.getClusteringCoefficientListOfTheNodes()));
		correlations.setCor_kCO_hLO(correlationCalculator.calculateCorrelation(degreeDistributionRelatedPropsCO.getDegreeListOfNodes(), homophilyRelatedPropsLO.getHomophilyListOfTheNodes()));
		correlations.setCor_kCO_alphaLO(correlationCalculator.calculateCorrelation(degreeDistributionRelatedPropsCO.getDegreeListOfNodes(), localAlphaRelatedPropsLO.getLocalAlphaListOfTheNodes()));
		correlations.setCor_kCO_accuracyLO(correlationCalculator.calculateCorrelation(degreeDistributionRelatedPropsCO.getDegreeListOfNodes(), accuracyRelatedPropsLO.getAccuracyListOfTheNodes()));
		
		correlations.setCor_cCO_kLO(correlationCalculator.calculateCorrelation(clusteringCoefficientRelatedPropsCO.getClusteringCoefficientListOfTheNodes(), degreeDistributionRelatedPropsLO.getDegreeListOfNodes()));
		correlations.setCor_cCO_cLO(correlationCalculator.calculateCorrelation(clusteringCoefficientRelatedPropsCO.getClusteringCoefficientListOfTheNodes(), clusteringCoefficientRelatedPropsLO.getClusteringCoefficientListOfTheNodes()));
		correlations.setCor_cCO_hLO(correlationCalculator.calculateCorrelation(clusteringCoefficientRelatedPropsCO.getClusteringCoefficientListOfTheNodes(), homophilyRelatedPropsLO.getHomophilyListOfTheNodes()));
		correlations.setCor_cCO_alphaLO(correlationCalculator.calculateCorrelation(clusteringCoefficientRelatedPropsCO.getClusteringCoefficientListOfTheNodes(), localAlphaRelatedPropsLO.getLocalAlphaListOfTheNodes()));
		correlations.setCor_cCO_accuracyLO(correlationCalculator.calculateCorrelation(clusteringCoefficientRelatedPropsCO.getClusteringCoefficientListOfTheNodes(), accuracyRelatedPropsLO.getAccuracyListOfTheNodes()));
		
		correlations.setCor_hCO_kLO(correlationCalculator.calculateCorrelation(homophilyRelatedPropsCO.getHomophilyListOfTheNodes(), degreeDistributionRelatedPropsLO.getDegreeListOfNodes()));
		correlations.setCor_hCO_cLO(correlationCalculator.calculateCorrelation(homophilyRelatedPropsCO.getHomophilyListOfTheNodes(), clusteringCoefficientRelatedPropsLO.getClusteringCoefficientListOfTheNodes()));
		correlations.setCor_hCO_hLO(correlationCalculator.calculateCorrelation(homophilyRelatedPropsCO.getHomophilyListOfTheNodes(), homophilyRelatedPropsLO.getHomophilyListOfTheNodes()));
		correlations.setCor_hCO_alphaLO(correlationCalculator.calculateCorrelation(homophilyRelatedPropsCO.getHomophilyListOfTheNodes(), localAlphaRelatedPropsLO.getLocalAlphaListOfTheNodes()));
		correlations.setCor_hCO_accuracyLO(correlationCalculator.calculateCorrelation(homophilyRelatedPropsCO.getHomophilyListOfTheNodes(), accuracyRelatedPropsLO.getAccuracyListOfTheNodes()));
		
		correlations.setCor_alphaCO_kLO(correlationCalculator.calculateCorrelation(localAlphaRelatedPropsCO.getLocalAlphaListOfTheNodes(), degreeDistributionRelatedPropsLO.getDegreeListOfNodes()));
		correlations.setCor_alphaCO_cLO(correlationCalculator.calculateCorrelation(localAlphaRelatedPropsCO.getLocalAlphaListOfTheNodes(), clusteringCoefficientRelatedPropsLO.getClusteringCoefficientListOfTheNodes()));
		correlations.setCor_alphaCO_hLO(correlationCalculator.calculateCorrelation(localAlphaRelatedPropsCO.getLocalAlphaListOfTheNodes(), homophilyRelatedPropsLO.getHomophilyListOfTheNodes()));
		correlations.setCor_alphaCO_alphaLO(correlationCalculator.calculateCorrelation(localAlphaRelatedPropsCO.getLocalAlphaListOfTheNodes(), localAlphaRelatedPropsLO.getLocalAlphaListOfTheNodes()));
		correlations.setCor_alphaCO_accuracyLO(correlationCalculator.calculateCorrelation(localAlphaRelatedPropsCO.getLocalAlphaListOfTheNodes(), accuracyRelatedPropsLO.getAccuracyListOfTheNodes()));
		
		correlations.setCor_accuracyCO_kLO(correlationCalculator.calculateCorrelation(accuracyRelatedPropsCO.getAccuracyListOfTheNodes(), degreeDistributionRelatedPropsLO.getDegreeListOfNodes()));
		correlations.setCor_accuracyCO_cLO(correlationCalculator.calculateCorrelation(accuracyRelatedPropsCO.getAccuracyListOfTheNodes(), clusteringCoefficientRelatedPropsLO.getClusteringCoefficientListOfTheNodes()));
		correlations.setCor_accuracyCO_hLO(correlationCalculator.calculateCorrelation(accuracyRelatedPropsCO.getAccuracyListOfTheNodes(), homophilyRelatedPropsLO.getHomophilyListOfTheNodes()));
		correlations.setCor_accuracyCO_alphaLO(correlationCalculator.calculateCorrelation(accuracyRelatedPropsCO.getAccuracyListOfTheNodes(), localAlphaRelatedPropsLO.getLocalAlphaListOfTheNodes()));
		correlations.setCor_accuracyCO_accuracyLO(correlationCalculator.calculateCorrelation(accuracyRelatedPropsCO.getAccuracyListOfTheNodes(), accuracyRelatedPropsLO.getAccuracyListOfTheNodes()));		
	}
	
	public static CorrelationManagerClass createCorrelationsResults(GraphClass graph, String datasetName)
	{
		CorrelationManagerClass correlationManager =  new CorrelationManagerClass();
		correlationManager.calculateCorrelationsResults(graph, datasetName);
		
		BufferedWriter outForCorrelationsResultsFile = createCorrelationsResultsFile(datasetName, "CorrelationsSeperate.tex");
		LatexForCorrelations.LatexUtilityForDatasetsCorrelations.datasetCorrelationsTableCreatorClass.printLatexDatasetCorrelationsTableToTheFileInMatrixFormat(outForCorrelationsResultsFile, graph, datasetName, correlationManager);
		
		outForCorrelationsResultsFile = createCorrelationsResultsFile(datasetName, "CorrelationsAll.tex");
		LatexForCorrelations.LatexUtilityForDatasetsCorrelations.datasetCorrelationsTableCreatorClass.printLatexDatasetCorrelationsTableToTheFileInComboMatrixFormat(outForCorrelationsResultsFile, graph, datasetName, correlationManager);
		
		return correlationManager;
	}
	
	static BufferedWriter createCorrelationsResultsFile(String datasetName, String suffixForTheFileName)
	{
    	String path = DirectoryStructureAndSettingsClass.getFullPathOfTheRootDirectoryNameForTheCurrentDataset()
		+ConstantVariable.DefaultDirectoryNamesConstants.DirectoriesUnderDatasetDirectory.CORRELATIONS_RELATED_FOLDER_NAME;
    	
    	//System.out.println("RootDirName:"+DirectoryStructureAndSettingsClass.getFullPathOfTheRootDirectoryNameForTheCurrentDataset());

    	try {
			File descFile=DirectoryStructureAndSettingsClass.createFile(path, datasetName+suffixForTheFileName);
			FileWriter fstream;
			fstream = new FileWriter(descFile);
			BufferedWriter out = new BufferedWriter(fstream);
			return out;
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;		
	}
	
	static void printCorrelations(GraphClass graph)
	{
		double cor_kCO_cCO = CorrelationCalculatorClass.calculateStatisticalYildizCorrelation(graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).degreeDistributionRelatedProps.getDegreeListOfNodes(), graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).clusteringCoefficientRelatedProps.getClusteringCoefficientListOfTheNodes());
		double cor_kCO_hCO = CorrelationCalculatorClass.calculateStatisticalYildizCorrelation(graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).degreeDistributionRelatedProps.getDegreeListOfNodes(), graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).homophilyRelatedProps.getHomophilyListOfTheNodes());
		double cor_kCO_alphaCO = CorrelationCalculatorClass.calculateStatisticalYildizCorrelation(graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).degreeDistributionRelatedProps.getDegreeListOfNodes(), graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).localAlphaRelatedProps.getLocalAlphaListOfTheNodes());
		double cor_kCO_accuracyCO = CorrelationCalculatorClass.calculateStatisticalYildizCorrelation(graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).degreeDistributionRelatedProps.getDegreeListOfNodes(), graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).accuracyRelatedProps.getAccuracyListOfTheNodes());
		
		double cor_cCO_hCO = CorrelationCalculatorClass.calculateStatisticalYildizCorrelation(graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).clusteringCoefficientRelatedProps.getClusteringCoefficientListOfTheNodes(), graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).homophilyRelatedProps.getHomophilyListOfTheNodes());
		double cor_cCO_alphaCO = CorrelationCalculatorClass.calculateStatisticalYildizCorrelation(graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).clusteringCoefficientRelatedProps.getClusteringCoefficientListOfTheNodes(), graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).localAlphaRelatedProps.getLocalAlphaListOfTheNodes());
		double cor_cCO_accuracyCO = CorrelationCalculatorClass.calculateStatisticalYildizCorrelation(graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).clusteringCoefficientRelatedProps.getClusteringCoefficientListOfTheNodes(), graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).accuracyRelatedProps.getAccuracyListOfTheNodes());
		
		double cor_hCO_alphaCO = CorrelationCalculatorClass.calculateStatisticalYildizCorrelation(graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).homophilyRelatedProps.getHomophilyListOfTheNodes(), graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).localAlphaRelatedProps.getLocalAlphaListOfTheNodes());
		double cor_hCO_accuracyCO = CorrelationCalculatorClass.calculateStatisticalYildizCorrelation(graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).homophilyRelatedProps.getHomophilyListOfTheNodes(), graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).accuracyRelatedProps.getAccuracyListOfTheNodes());
		
		double cor_alphaCO_accuracyCO = CorrelationCalculatorClass.calculateStatisticalYildizCorrelation(graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).localAlphaRelatedProps.getLocalAlphaListOfTheNodes(), graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).accuracyRelatedProps.getAccuracyListOfTheNodes());
		
		double cor_kLO_cLO = CorrelationCalculatorClass.calculateStatisticalYildizCorrelation(graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).degreeDistributionRelatedProps.getDegreeListOfNodes(), graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).clusteringCoefficientRelatedProps.getClusteringCoefficientListOfTheNodes());
		double cor_kLO_hLO = CorrelationCalculatorClass.calculateStatisticalYildizCorrelation(graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).degreeDistributionRelatedProps.getDegreeListOfNodes(), graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).homophilyRelatedProps.getHomophilyListOfTheNodes());
		double cor_kLO_alphaLO = CorrelationCalculatorClass.calculateStatisticalYildizCorrelation(graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).degreeDistributionRelatedProps.getDegreeListOfNodes(), graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).localAlphaRelatedProps.getLocalAlphaListOfTheNodes());
		double cor_kLO_accuracyLO = CorrelationCalculatorClass.calculateStatisticalYildizCorrelation(graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).degreeDistributionRelatedProps.getDegreeListOfNodes(), graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).accuracyRelatedProps.getAccuracyListOfTheNodes());
		
		double cor_cLO_hLO = CorrelationCalculatorClass.calculateStatisticalYildizCorrelation(graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).clusteringCoefficientRelatedProps.getClusteringCoefficientListOfTheNodes(), graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).homophilyRelatedProps.getHomophilyListOfTheNodes());
		double cor_cLO_alphaLO = CorrelationCalculatorClass.calculateStatisticalYildizCorrelation(graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).clusteringCoefficientRelatedProps.getClusteringCoefficientListOfTheNodes(), graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).localAlphaRelatedProps.getLocalAlphaListOfTheNodes());
		double cor_cLO_accuracyLO = CorrelationCalculatorClass.calculateStatisticalYildizCorrelation(graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).clusteringCoefficientRelatedProps.getClusteringCoefficientListOfTheNodes(), graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).accuracyRelatedProps.getAccuracyListOfTheNodes());
		
		double cor_hLO_alphaLO = CorrelationCalculatorClass.calculateStatisticalYildizCorrelation(graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).homophilyRelatedProps.getHomophilyListOfTheNodes(), graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).localAlphaRelatedProps.getLocalAlphaListOfTheNodes());
		double cor_hLO_accuracyLO = CorrelationCalculatorClass.calculateStatisticalYildizCorrelation(graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).homophilyRelatedProps.getHomophilyListOfTheNodes(), graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).accuracyRelatedProps.getAccuracyListOfTheNodes());
		
		double cor_alphaLO_accuracyLO = CorrelationCalculatorClass.calculateStatisticalYildizCorrelation(graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).localAlphaRelatedProps.getLocalAlphaListOfTheNodes(), graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).accuracyRelatedProps.getAccuracyListOfTheNodes());
		
		Utility.WorkerUtilityClass.printSeperator();
		
		System.out.println("avg_kCO:"+graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).degreeDistributionRelatedProps.getAverageDegreeOfNodes());
		System.out.println("avg_cCO:"+graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).clusteringCoefficientRelatedProps.getClusteringCoefficientOfTheGraph());
		System.out.println("avg_hCO:"+graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).homophilyRelatedProps.getHomophilyOfTheGraph());
		System.out.println("avg_alphaCO:"+graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).localAlphaRelatedProps.getLocalAlphaOfTheGraph());
		System.out.println("avg_accCO:"+graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE_FOR_CONTENT_GRAPH).accuracyRelatedProps.getAccuracyOfTheGraph());
		
		Utility.WorkerUtilityClass.printSeperator();
		
		System.out.println("avg_kLO:"+graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).degreeDistributionRelatedProps.getAverageDegreeOfNodes());
		System.out.println("avg_cLO:"+graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).clusteringCoefficientRelatedProps.getClusteringCoefficientOfTheGraph());
		System.out.println("avg_hLO:"+graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).homophilyRelatedProps.getHomophilyOfTheGraph());
		System.out.println("avg_alphaLO:"+graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).localAlphaRelatedProps.getLocalAlphaOfTheGraph());
		System.out.println("avg_accLO:"+graph.getPropertiesOfTheGraphWithRespectToEdgeType().get(ConstantVariable.Common_ConstantVariables.DEFAULT_EDGE_TYPE).accuracyRelatedProps.getAccuracyOfTheGraph());
		
		Utility.WorkerUtilityClass.printSeperator();
		
		System.out.println("cor_kCO_cCO:"+cor_kCO_cCO);
		System.out.println("cor_kCO_hCO:"+cor_kCO_hCO);
		System.out.println("cor_kCO_alphaCO:"+cor_kCO_alphaCO);
		System.out.println("cor_kCO_accuracyCO:"+cor_kCO_accuracyCO);
		
		System.out.println("cor_cCO_hCO:"+cor_cCO_hCO);
		System.out.println("cor_cCO_alphaCO:"+cor_cCO_alphaCO);
		System.out.println("cor_cCO_accuracyCO:"+cor_cCO_accuracyCO);
		
		System.out.println("cor_hCO_alphaCO:"+cor_hCO_alphaCO);
		System.out.println("cor_hCO_accuracyCO:"+cor_hCO_accuracyCO);
		
		System.out.println("cor_alphaCO_accuracyCO:"+cor_alphaCO_accuracyCO);
		
		Utility.WorkerUtilityClass.printSeperator();
		
		System.out.println("cor_kLO_cLO:"+cor_kLO_cLO);
		System.out.println("cor_kLO_hLO:"+cor_kLO_hLO);
		System.out.println("cor_kLO_alphaLO:"+cor_kLO_alphaLO);
		System.out.println("cor_kLO_accuracyLO:"+cor_kLO_accuracyLO);
		
		System.out.println("cor_cLO_hLO:"+cor_cLO_hLO);
		System.out.println("cor_cLO_alphaLO:"+cor_cLO_alphaLO);
		System.out.println("cor_cLO_accuracyLO:"+cor_cLO_accuracyLO);
		
		System.out.println("cor_hLO_alphaLO:"+cor_hLO_alphaLO);
		System.out.println("cor_hLO_accuracyLO:"+cor_hLO_accuracyLO);
		
		System.out.println("cor_alphaLO_accuracyLO:"+cor_alphaLO_accuracyLO);
	}
}
